package com.ywk.pattern._14_observer._14_8;


public class Main {
    public static void main(String[] args) {
        Subject secretary = new Boss();
        StockObserver stockObserver1 = new StockObserver();
        NBAObserver stockObserver2 = new NBAObserver();

        secretary.addListener(stockObserver1, "CloseStockMarket");
        secretary.addListener(stockObserver2, "CloseNBA");
        secretary.notifyX();


    }
}
